[SPARK-6537] UIWorkloadGenerator: The main thread should not stop SparkContext until all jobs finish#5187
Closed
sarutak wants to merge 1 commit intoapache:masterfrom
Closed
[SPARK-6537] UIWorkloadGenerator: The main thread should not stop SparkContext until all jobs finish#5187sarutak wants to merge 1 commit intoapache:masterfrom
sarutak wants to merge 1 commit intoapache:masterfrom
Conversation
…fter all jobs finish
Contributor
There was a problem hiding this comment.
why not just join() on all of those threads?
Member
Author
There was a problem hiding this comment.
It's because I didn't think it's simple to use join(); we need to allocate array for those threads and the main thread should call for each thread in the array.
But, I also think it's simpler to use CounDownLatch instead of Semaphore right?
Contributor
There was a problem hiding this comment.
Hm yeah. Well I don't have a strong opinion either way. Either count down latch or semaphore is fine.
|
Test build #29165 has finished for PR 5187 at commit
|
Contributor
|
Actually LGTM I'll just merge this to master as is. Thanks @sarutak. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The main thread of UIWorkloadGenerator spawn sub threads to launch jobs but the main thread stop SparkContext without waiting for finishing those threads.